package com.niguang.work.show.api.controller;


import com.niguang.work.show.api.entity.User;
import com.niguang.work.show.api.service.UserService;
import com.niguang.work.show.common.pojo.Result;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author 12380
 * @since 2018-12-05
 */
@RestController
@RequestMapping("/api/user")
public class UserController {

    @Resource
    private UserService userService;

    @PostMapping("updateUser/v1")
    public Result<Boolean> updateUser(@Valid User user) {
        return Result.success(userService.updateUser(user));
    }
}

